
$(function () {

  var data = localStorage.getItem("shopcart")
  data = JSON.parse(data);
  $.each(data, function (index, item) {
    console.log(index)
    $(".cart_wrapper").append(`<ul class="shop_list id="${index} w">
        <div class="ckeckbox">
          <input type="checkbox" class="check_box" />
        </div>
        <div class="product_mes">
          <img src="${item.path}" alt="" />
          <p class="title">${item.title}</p>
        </div>
        <div class="one_price">${item.price}</div>
        <div class="num">
          <span class="decreat">-</span>
          <input type="text" value="1" class="amount" />
          <span class="increat">+</span>
        </div>
        <div class="subtotal">${item.price}</div>
        <div class="del">删除</div>
      </ul>`)
  });
})